import request from '@/utils/request'

// 获取员工信息
export function getclientLists(obj) {
  return request({
    // url: `/clients?_limit=${obj._limit}&_start=${obj._start}&name_contains=${obj.title_contains}&agent=${obj.curId}`
    url: '/clients',
    params: obj
  })
}
// 获取经纪人列表
export function getBroker() {
  return request({
    url: '/agents'
  })
}
// 新增员工
export function addClientLists(data) {
  return request({
    url: '/clients',
    method: 'post',
    data
  })
}
// 删除员工
export function dleClientLists(id) {
  return request({
    url: '/clients/' + id,
    method: 'DELETE'
  })
}
// 根据id获取用户
export function getClientId(id) {
  return request({
    url: '/clients/' + id,
    method: 'GET'
  })
}
// 新增员工
export function updateClientList(data) {
  return request({
    url: '/clients/' + data.id,
    method: 'PUT',
    data
  })
}
// 获取员工数量
export function getClientNum() {
  return request({
    url: '/clients/count'
  })
}
